# @Author：silence
# @Email：792245022@qq.com
# @Date：2025/1/12 12:23

money = 10_0000
count = 0

while True:
    if money < 1000:
        break
    if money > 5_0000:
        money -= money * 0.05
    else:
        money -= 1000
    count += 1

print(f"可以经过 {count} 次路口，剩余的钱为 {money}")